composetable: Ignore length 1 sequences
authorMatthias Clasen <mclasen@redhat.com>
Thu, 8 Jul 2021 03:22:23 +0000 (23:22 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Wed, 14 Jul 2021 02:02:33 +0000 (22:02 -0400)
It turns out that the X11 Compose file has some
length 1 sequences which are not interesting to us.

gtk/gtkcomposetable.c

index e32f11f3d54edddd80e66e027fb00924e0f9b50d..2a012efa295949974977db2d23612d08e5f1bb45 100644 (file)
@@ -508,6 +508,12 @@ parser_remove_duplicates (GtkComposeParser *parser)
           goto next;
         }
 
+      if (sequence[1] == 0)
+        {
+          remove_sequence = TRUE;
+          goto next;
+        }
+
       for (i = 0; i < MAX_COMPOSE_LEN + 1; i++)
         keysyms[i] = 0;